//
//  SecureManager.h
//  HandPay
//
//  Created by xy on 10-5-7.
//  Copyright 2010 HANDPAY. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface SecureManager : NSObject {
	NSDate * overdate;
	int * securekey;//8
	int * secureseed;//16
	NSString * securekeyindex;
	NSString * sessionId;
}
@property (nonatomic, retain) NSDate * overdate;
@property int * securekey;
@property int * secureseed;  
@property (nonatomic, retain) NSString * securekeyindex;
@property (nonatomic, retain) NSString * sessionId;

-(NSString *)NeedCreatSecureKey;

-(void)ReSetSecure:(NSString *)keyindex;

-(NSString *)encryptDes:(NSString *)data;  // 默认秘钥加密
-(NSString *)decryptDes:(NSString *)data;  // 默认秘钥解密

-(NSString *)Des:(NSString *)data withKey:(NSString * )key withflag:(int) flag;
-(NSString *)MD5:(NSString *)data;
-(NSString *)MAC:(NSString *)data withKey:(NSString *)key;
-(NSString *)CalcCRC:(const char *)data withlen:(NSUInteger)len;
-(NSString *)RSA:(NSString *)data;
@end
